namespace EventBehaviorTree
{
    public enum NodeMessage
    {
        /// <summary>
        /// Send to start a sequence or a task.
        /// </summary>
        Start,
        /// <summary>
        /// Node mission done successfully.
        /// </summary>
        Success,
        /// <summary>
        /// Node failed to get the condition.
        /// </summary>
        Failure,
        /// <summary>
        /// Stop all sub tasks with their coroutines, only send by senior node
        /// </summary>
        COMMAND_Stop,
        /// <summary>
        /// Stop senior node, sended from the leaf node.
        /// </summary>
        REQUEST_Abort,
    }

    public enum StopMode
    {
        /// <summary>
        /// Never send the stop request.
        /// </summary>
        None,
        /// <summary>
        /// Stop senior node.
        /// </summary>
        Abort,
        /// <summary>
        /// Stop the behavior tree.
        /// </summary>
        Shutdown,
    }

    public enum NodeType
    {
        #region Container
        /// <summary>
        /// Success when all nodes successed.
        /// </summary>
        Sequencer,
        /// <summary>
        /// Success when anyone node successed.
        /// </summary>
        Selector,
        /// <summary>
        /// Success when repeat for the setting times.
        /// </summary>
        SimpleRepeater,
        #endregion
        #region Condition
        /// <summary>
        /// Task upon timer.
        /// </summary>
        CountdownSequencer,
        /// <summary>
        /// Check out current condition.
        /// </summary>
        InstantCondition,
        /// <summary>
        /// Starts task once condition is true and stops when it is false.
        /// </summary>
        AsyncSwitcher,
        #endregion
        #region Task
        /// <summary>
        /// Single frame task.
        /// </summary>
        InstantTask,
        /// <summary>
        /// Asynchronous task.
        /// </summary>
        Asynchronous
        #endregion
    }

    public enum TriggerMode
    {
        /// <summary>
        /// Task done, Message, Timer, Stop
        /// </summary>
        Async,
        /// <summary>
        /// Message, Timer, Task done, Stop
        /// </summary>
        AsyncDelay,//if task failed, message may conflict with earlier message
        /// <summary>
        /// Task done, Timer, Message, Stop
        /// </summary>
        Busy,
        /// <summary>
        /// Timer, Task done, Message, Stop
        /// </summary>
        Delay,
    }

    public enum ContainerMode
    {
        /// <summary>
        /// Start coroutine, Message, Task done, Stop
        /// </summary>
        Async,
        /// <summary>
        /// Task done, Message, Stop
        /// </summary>
        Busy,
    }
}
